﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="lop_hoc_Default" %>
<%@ Register TagPrefix="uc" TagName="Playslide" Src="~/Controls/ucPlayslide.ascx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <link href="../css/lophoc.css" rel="stylesheet" type="text/css" />
        <link href="../css/jquery.ui.base.css" rel="stylesheet" type="text/css" />
        <link href="../css/jquery.ui.theme.css" rel="stylesheet" type="text/css" />
        <link href="../css/jquery-ui.css" rel="stylesheet" type="text/css" />
        <link href="../Admin/css/slide.css" rel="stylesheet" type="text/css" />
        <link href="../Admin/css/custom.css" rel="stylesheet" type="text/css" />
        <style type="text/css">
            .time-title
            {
                font-size:10px;
                font-weight:normal;
                color:#CD3333;
            }
            .course-content
            {
                padding: 10px;
            }
        </style>
        <script src="../js/jquery-1.7.2.js" type="text/javascript"></script>
        <script src="../js/jquery-ui/jquery.ui.core.min.js" type="text/javascript"></script>
        <script src="../js/jquery-ui/jquery.ui.widget.min.js" type="text/javascript"></script>
        <script src="../js/jquery-ui/jquery.ui.accordion.min.js" type="text/javascript"></script>
        <script src="../js/jquery-ui/jquery.ui.button.min.js" type="text/javascript"></script>
        <script src="../js/jquery-ui/jquery.ui.progressbar.min.js" type="text/javascript"></script>
        <script src="../js/server.js" type="text/javascript"></script>
        <script src="../Admin/js/json2.js" type="text/javascript"></script>
        <script src="../Plugin/flowplayer/flowplayer-3.2.10.min.js" type="text/javascript"></script>
        <style type="text/css">
	        .ui-progressbar-value 
	        { 
	            background-image: url(<%=ResolveUrl("~/css/img/loading-bar.gif")%>);
	        }
	        #progressbar
	        {
	            display: block;
                float: left;
                height: 14px;
                margin-top: 6px;
                width: 200px;
	        }
	    </style>
        <script type="text/javascript">
            var FK_iSlideID = null;
            var FK_iKhoahocID = <%=iGetFK_iKhoahocID() %>; //ID của khóa học
            var FK_iHocvienID = <%=iGetUserLogin() %>; //ID của người dùng
            if(FK_iHocvienID <= 0)
            {
//                alert("Bạn phải đăng nhập để xem slide này!");
                window.location = '<%=ResolveUrl("~/Admin/Login.aspx?re=lop-hoc") %>';
            }
            $(function () {
                //Tạo accordion mục lục bên trái
                $("#accordion").accordion({
                });
                //Đặt lại thuộc tính hiển thị slide
                $('#screen-slide').css('position', 'relative');
                //Đặt sự kiện click tên slide -> hiển thị slide tương ứng
                var lstDivTrangslide = $(".lnk-slide");
                $.each(lstDivTrangslide, function (i, val) {
                    $(".lnk-slide:eq(" + i + ")").bind('click',
		                function () {
                            $('#screen-slide').css('display', 'inline');
                            $("#panContent").css("display", "none");
		                    FK_iSlideID = parseInt($(".lnk-slide:eq(" + i + ")").attr("rel"));
                            showVideoByPK_iSlideID(FK_iSlideID); //Hiển thị video là load các trang slide theo PK_iSlideID để hiển thị
		                });
                    });
                });
        </script>
        <title>HOU-LMS | Lớp học</title>
    </head>
    <body class="courseware">
        <form runat="server" id="frmLophoc">
    	<div class="header-wrapper">
        	 <header> 
             	<hgroup> 
                	<h1><em><a href="<%=ResolveUrl("~/") %>">HOU-eLearning</a></em></h1> 
                    <h2>
                    <a href="">
                        <asp:Label ID="lblTenkhoahoc" runat="server" Text=""></asp:Label>
                    </a>
                    </h2> 
                </hgroup> 
                <nav class="courseware"> 
                    <ul class="coursenav"> 
                        <li class="courseware">
                            <a href="<%=ResolveUrl("~/lop-hoc/?page=Danhsachkhoahoc") %>" id="nav-khoahoc">Khóa học</a>
                        </li> 
                        <li class="info">
                            <a href="<%=ResolveUrl("~/lop-hoc/?page=Chitietkhoahoc") %>" id="nav-thongtin">Thông tin</a>
                        </li> 
                        <li class="book"><a href="" id="nav-tailieu">Tài liệu</a></li> 
                        <li class="discussion"><a href="" id="nav-hoidap">Hỏi đáp</a></li>
                        <li class="discussion">
                            <%--<asp:HyperLink ID="hplKetquahoctap" runat="server" CssClass="nav-ketqua">Kết quả học tập</asp:HyperLink>--%>
                        <a href="<%=ResolveUrl("~/lop-hoc/?page=Thongkequatrinhhoc") %>" id="nav-ketqua">Kết quả học tập</a></li>
                        <li class="profile">
                            <a href="<%=ResolveUrl("~/lop-hoc/?page=Chungchi") %>" id="nav-chungchi">Chứng chỉ</a>
                        </li> 
                        <li class="profile"><a href="" id="nav-thongtincanhan">Thông tin cá nhân</a></li>
                    </ul> 
                </nav> 
        	</header>
        </div>
        <section class="main-content"> 
        	<div class="course-wrapper">
                <!-- mục lục -->
            	<section class="course-index">
                    <asp:Panel runat="server" ID="panMucluc" Visible="false">
                	    <header id="open_close_accordion"> 
                    	    <h2>Mục lục</h2> 
                        </header> 
                        <div id="accordion">
                            <asp:Repeater ID="rptBaihoc" runat="server" 
                                onitemdatabound="rptBaihoc_ItemDataBound">
                                <ItemTemplate>
                                    <h3 rel="<%# DataBinder.Eval(Container.DataItem, "PK_iBaihocID") %>">
                                        <span class="ui-icon ui-icon-triangle-1-e">
                        	            </span>
                                        <a>
                                            Bài <%# Container.ItemIndex + 1 %>: <%# DataBinder.Eval(Container.DataItem, "sTenbaihoc") %>
                                            
                                            <asp:Label ID="lblGiohoc" runat="server" CssClass="time-title" Text=""></asp:Label>
                                        </a>
                                    </h3>
                                    <asp:Repeater ID="rptSlide" runat="server">
                                        <HeaderTemplate>
                                            <ul>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <li>
                                                <a class="lnk-slide" style="cursor:pointer;" rel="<%# DataBinder.Eval(Container.DataItem, "PK_iSlideID") %>"> 
                                                    <p>Slide <%# Container.ItemIndex + 1 %>:  <%# DataBinder.Eval(Container.DataItem, "sTenslide") %></p> 
                                                    <p class="subtitle"><%# DataBinder.Eval(Container.DataItem, "sGhichu") %></p> 
                                                </a> 
							                </li>
                                        </ItemTemplate>
                                        <FooterTemplate>
                                            </ul>
                                        </FooterTemplate>
                                    </asp:Repeater>
                                </ItemTemplate>
                            </asp:Repeater>
		                </div>
                    </asp:Panel>
                </section>
                <!-- Hết mục lục -->
		        <section class="course-content">
                    <asp:Panel runat="server" ID="panContent">
                        <div runat="server" id="divThongbao"></div>
                        <asp:PlaceHolder ID="content_main" runat="server"></asp:PlaceHolder>
                    </asp:Panel>
			        <div id="screen-slide">
                        <div class="slide-left screen-slide">
                            <div id="slide-video">
                                <a href='#' id='player'></a>
                            </div>
                            <div id="thumb-slide">
                                <ol id="list-slide"></ol>
                            </div>
                        </div>
                        <div class="slide-right screen-slide">
                            <div id="header-slide"></div>
                            <div id="view-slide"></div>
                        </div>
                        <div class="nav-slide">
                            <table width="100%">
                                <tr>
                                    <td style="width:30%" align="left" id="td-status">
                                        <label id="slide-status"></label>
                                    </td>
                                    <td align="center" style="width:40%">
                                        <button type="button" id="btnPrev" class="btn blue-btn"><</button>&nbsp;&nbsp;&nbsp;
                                        <button type="button" id="play-btn" class="btn red-btn">Chạy</button>&nbsp;&nbsp;&nbsp;
                                        <button type="button" id="btnNext" class="btn blue-btn">></button>
                                    </td>
                                    <td align="right" style="width:30%">
                                        <div id="progressbar"></div>
                                        <button type="button" id="page-number" class="btn gray-btn">-/-</button>&nbsp;&nbsp;&nbsp;&nbsp;
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
		        </section> 
		    </div> 
        </section>
        <footer>
            <p>
                Copyright &copy; 2012. Liêm & Minh Team. 
                <a href="mailto:liem&minh@googlegroups.com">Contact</a> 
            </p> 
            <nav> 
                <ul> 
                    <li><a rel="leanModal" href="#feedback_div">Feedback</a></li> 
                    <li><a href="/s/help.html">Help</a></li>
                    <li><a href="/logout">Log out</a></li> 
                </ul> 
            </nav>
        </footer>
        </form>
    </body>
</html>
<script src="../Admin/js/slide.js" type="text/javascript"></script>
<script type="text/javascript">
//    $(document).ready(function () {
//        var interval = setInterval(function () {
//            location.reload();
//        }, 5000); 
//    });
</script>
<%--End--%>